package socket;

import io.AsyncServerByteSocket;
import io.AsyncServerSocketException;

import java.io.Serializable;

public class FunccodeServersocket implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int port;
	AsyncServerByteSocket server;
	

	public FunccodeServersocket(int port) {
		super();
		this.port = port;
		this.server= new AsyncServerByteSocket(port);
		server.setEventListener(new FunccodeServerEventListener(server));
		
	}
	
	public void run(){
		try {
			this.server.open();
		} catch (AsyncServerSocketException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	
	

}
